package com.acsior.hibernate.vo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

import com.acsior.dac.impl.hibernate.vo.GeneratorKey;
import com.acsior.dac.impl.hibernate.vo.HibernatePersistantIntegerIdVO;

/**
 * SubscriptionSpeading entity. @author MyEclipse Persistence Tools
 * <b><i>powered by Belev</i></b>
 */
@Entity
@Table(name = "subscription_roadmaps", uniqueConstraints = @UniqueConstraint(columnNames = {
		"structure_id", "subscription_id" }))
@GeneratorKey(tableName = "subscription_roadmaps")
public class SubscriptionRoadmapVO extends HibernatePersistantIntegerIdVO {

	private static final long serialVersionUID = 5679204958691670073L;

	@Temporal(TemporalType.DATE)
	@Column(name = "delivery_date", length = 10)
	private Date deliveryDate;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "postman_id", nullable = false)
	private PostmanVO postman;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "region_id", nullable = false)
	private RegionRouteVO region;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "route_id")
	private RegionRouteVO route;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "structure_id", nullable = false)
	private StructureVO structure;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "subscription_id", nullable = false)
	private SubscriptionVO subscription;

	/** default constructor */
	public SubscriptionRoadmapVO() {
		super();
	}

	/** @return the deliveryDate */
	public Date getDeliveryDate() {
		return this.deliveryDate;
	}

	/** @return the postman */
	public PostmanVO getPostman() {
		return this.postman;
	}

	/** @return the region */
	public RegionRouteVO getRegion() {
		return this.region;
	}

	/** @return the route */
	public RegionRouteVO getRoute() {
		return this.route;
	}

	/** @return the structure */
	public StructureVO getStructure() {
		return this.structure;
	}

	/** @return the subscription */
	public SubscriptionVO getSubscription() {
		return this.subscription;
	}

	/** @param deliveryDate */
	public void setDeliveryDate(Date deliveryDate) {
		this.deliveryDate = deliveryDate;
	}

	/** @param postman */
	public void setPostman(PostmanVO postman) {
		this.postman = postman;
	}

	/** @param region */
	public void setRegion(RegionRouteVO region) {
		this.region = region;
	}

	/** @param route */
	public void setRoute(RegionRouteVO route) {
		this.route = route;
	}

	/** @param structure */
	public void setStructure(StructureVO structure) {
		this.structure = structure;
	}

	/** @param subscription */
	public void setSubscription(SubscriptionVO subscription) {
		this.subscription = subscription;
	}
}